<?php

namespace Api\Openapi;

/**
 * Class Trans
 * @package Api\Openapi
 * @description 银联sdk
 *
 * 使用样例
 *
 * i. 查询交易记录
 *
 * $sdk = new \Api\Openapi\Trans();
 * $result = $sdk->queryTransRecord('321322********5436', '*常宝', '158*********', '北京市', 'test');
 */
class Bank {

    const URI_TRAVEL_AREO_INFO = '/bank/transrecord';

    /**
     * 查询交易记录
     *
     * @param $cert_no
     * @param $name
     * @param array $card_no_list
     * @param $mobile
     * @param $address
     * @param $remark
     * @param array $options
     *
     * @return array
     */
    public function queryTransRecord($cert_no, $name, array $card_no_list, $mobile, $address, $remark, array $options = array()) {
        $body = array(
            'cert_no' => $cert_no,
            'name'    => $name,
            'mobile'  => $mobile,
            'address' => $address,
            'card_no_list' => $card_no_list,
            'remark'  => $remark,
            'options' => $options,
        );
        $param = array(
            'header' => array(),
            'body'   => $body,
        );

        $result = Util::request(self::URI_TRAVEL_AREO_INFO, $param);

        return $result["body"];
    }
}